package com.fulu.game.bi.entity.vo;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

@AllArgsConstructor
@Getter
public enum ExceptionCode{
    NOT_EXIST_USER_AUTH(40000, "用户未登录"),
    TOO_MANY_TIMES(40002, "半个小时之内不能再登录"),
    CAPTCHA_WRONG(40003, "验证码错误"),

    SERVER_ERROR(50000, "服务器错误"),
    ;
    private int code;
    private String msg;

    public ErrorMsg toObject() {
        ErrorMsg errorMsg = new ErrorMsg();
        errorMsg.setErrcode(code);
        errorMsg.setMsg(msg);
        return errorMsg;
    }
}
